package com.potenza.training.dictionary.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 期望城市
 */
@Data
@TableName("tb_hope_address")
@AllArgsConstructor
@NoArgsConstructor
public class HopeAddress implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 期望城市ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 期望城市名称
     */
    private String address;
    /**
     * 期望城市ID外键
     */
    private Integer pid;

    @TableField(exist = false)
    private List<HopeAddress> children;
}
